import { SET_USER_LIST, ADD_USER } from '../action-types';
const initialState = {
  list: []
}
function user(state = initialState, action) {
  switch (action.type) {
    case SET_USER_LIST:
      return { list: action.payload };
    case ADD_USER:
      return { list: [...state.list, action.payload] };
    default:
      return state;
  }
}
export default user;